{foreach $data as $val}
<dl action-type="feed_list_item" mid="{$val.id}" class="feed_list ">
	<dt class="face"> <a title="全球热门搜罗" href="weibo/{$val.user.id}.html"><img width="50" height="50" src="{$val.user.profile_image_url}" alt="" title="全球热门搜罗" usercard="id=1740577714"></a> </dt>
	<dd class="content">
		<p node-type="feed_list_content"> <a usercard="id=1740577714" href="weibo/{$val.user.id}.html" title="{$val.user.screen_name}" nick-name="{$val.user.screen_name}"> {$val.user.screen_name}</a>：{$val.text}</p>
		<ul node-type="feed_list_media_prev" class="piclist">
		  
			<li class="fnt_gray fnt_mid"> 
				{if isset($val.reply_comment)}评论 我 的评论：<a href="">"{$val.reply_comment.text}"</a>{else}评论 我 的微博：<a href="">"{$val.status.text}"</a>{/if}
			</li>
		</ul>
		<dl node-type="feed_list_media_disp" style="display: none;" class="comment">
		</dl>
		<p class="info W_linkb W_textb"> <span> <a action-type="feed_list_comment" action-data='{$val.id}' action-s-id='{$val.status.id}' href="javascript:void(0);">回复</a> </span> <a node-type="feed_list_item_date" class="date realTime" href="#">{strtotime($val.created_at)}</a> 来自{$val.source} </p>
		<div style="display:none;" class="repeat" node-type="feed_list_repeat"></div>
	</dd>
	<dd class="clear"></dd>
</dl>
{/foreach}
<script type="text/javascript" charset="utf-8">
$('a.realTime').each(function(){
  $(this).html(realTime.outPut($(this).html()));
  $(this).removeClass('realTime');
});

$('a[action-type=feed_list_comment]').click(function(){
	$('.repeat').hide();
	var id = $(this).attr('action-data');
	var sid = $(this).attr('action-s-id');
	var html = append_comment_input(id, sid);
	var rpl_div = $(this).parents('dl').find('div.repeat');
	rpl_div.html(html).show();
});

function append_comment_input (id, sid) {
	return  '<div class="arrow"><span>◆</span></div>\
	<div class="input clearfix" node-type="commentList">\
		<div>\
		<textarea node-type="textEl" rows="" cols="" action-type="check" style="margin: 0px 0px 3px; padding: 4px 4px 0px; border-color: rgb(198, 198, 198); border-style: solid; border-width: 1px; font-size: 12px; font-family: Tahoma,宋体; word-wrap: break-word; line-height: 18px; overflow: hidden; outline: medium none; height: 20px;" id="tweet_content"></textarea>\
		</div>\
	  <div node-type="widget" class="action clearfix">\
	    <!-- <span node-type="smileyBtn" alt="表情" title="表情" class="faces"></span> -->\
				<div class="post_btn"> <a href="#" class="ico1">表情</a>\
					<div class="post_win" style="left:-30px;display:none">\
						<div class="post_win_t"></div>\
						<a href="#" class="close">关闭</a>\
						<div class="post_win_tab clearfix"><a href="#" class="current loding">loading...</a></div>\
					</div>\
				</div>\
	  <ul class="commoned_list">\
	    	<li>\
	  	<label>\
	    	<input type="checkbox" name="forward" class="W_checkbox">同时转发到我的微博\
	    </label>\
	  </li>\
	  </ul>\
		</div>\
		<p class="btn">\
	  	<a action-data="'+id+'" action-data-s="'+sid+'" href="#" action-type="post" class="W_btn_b btn_noloading"><span><b class="loading"></b><em node-type="btnText">评论</em></span></a>\
		</p>\
	</div>';
};
var lock_c = true;

$('a[action-type=post]').live('click', function(){
    var id = $(this).attr('action-data');
    var sid = $(this).attr('action-data-s');
    var p = $(this).parents('div.repeat');
    var c = p.find('textarea');
    var cb = p.find('input[name=forward]');
    if (!c.val()) {
      show_msg('请输入内容', function(){
        c.focus();
      });
      return false;
    }
    loading();
	lock = false;
	page = 2;
    var item = 0;
    if (cb.is(':checked')) {
        item = 1;
    }
	if (lock_c) {
		lock_c = false;
		p.html('<div class="W_loading" node-type="lazyload"><span>正在发送中，请稍候...</span></div>').show();
		$.post(SITE_URL + '/ajax/statuses_reply.html', { id:id, sid:sid, con:c.val(), item:item}, function(data){
	        loading('off');
		      show_msg('回复成功', function(){
		        $('.repeat').hide();
		      }, 'success');
			lock_c = true;
		});
	}

    return false;
});
</script>